package com.googlecode.cannedbeans.generator.model;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Kim
 */
public class Constraint {

    private ConstraintType constraintType;
    private Map < String, Object > properties = new HashMap < String, Object >();

    public ConstraintType getConstraintType() {
        return constraintType;
    }

    public void setConstraintType(ConstraintType constraintType) {
        this.constraintType = constraintType;
    }
    
    public Object getProperty (String propertyName) {
        return this.properties.get(propertyName);
    }
    
    public Object addProperty (String propertyName, Object value) {
        return this.properties.put(propertyName, value);
    }
    
    public Object removeProperty (String propertyName) {
        return this.properties.remove(propertyName);
    }
}
